The present invention relates to audio data from an optical media, and more particularly to the retrieval of audio data from the optical media.
FIG. 1 illustrates a conventional method of retrieving audio data from an optical media, such as a Compact Disc (CD). The audio data comprises sectors of data, each sector having a header which identifies it, i.e., identifies where the sector begins. The identifying information in the header is obtained from the xe2x80x9csub-Qxe2x80x9d bytes of the sector. Before the audio data may be played, it must first be decoded. Part of the decoding process is the location and correction of any errors in the audio data after demodulation. This process is typically referred to as the Error Correction Code (ECC) process. For audio data, the ECC process occurs in two stages: C1 correction 102, and C2 correction 104. C1 and C2 refer to two standard encoding processes for encoding additional information into the data for use in correction of errors which may exist after demodulation. In the C2 encoding process, additional bytes are encoded into the C1 encoded data, and the frames of the C2 encoded data are interleaved with an appropriate time delay. This decreases the probability of having an uncorrectable error. In the C1 encoding process, additional bytes are encoded containing information about the data, such that for a data to be uncorrectable, both the data itself and the C1 encoded bytes must fail. The C1 encoding process further decreases the probability of an uncorrectable error. The C1 and C2 encoding processes are standards in the art and will not be described in further detail here. In the ECC process, the interleaved state of the data from the C2 encoding process is reversed. Errors in the decoding are then corrected by the ECC using the information encoded by the C1 and C2 encoding processes.
The data of each sector need to be corrected, but not the sub-code. Thus, at node A, the sector data are forwarded to the C1 and C2 correction 102, 104 and then to node B, while the sector sub-code is forwarded directly to node B. The sector sub-code circumvents the ECC process. Thus, the sector data arrives at node B after its sector sub-code. In addition, the amount of time required for completion of the ECC process varies, depending on the presence of errors, the number of errors, the speed of the disc, and other factors. Thus, the amount of time required for a sector data to travel from node A to node B varies.
Conventionally, a group of audio data sectors is read from the CD until a buffer 110 is filled. Then the reading of the CD is suspended. The buffered data sectors are then forwarded to the Digital to Analog Converter 106 (DAC) and audio device 108. Once the data in the buffer 110 is played, the reading of the audio data resumes where it left off. In order to do so, the location of the last read sector must be found, i.e., its identity must be known. Otherwise, the location from which to resume reading cannot be determined. However, the sector data reaches node B without its corresponding sector sub-code. Thus, in order to know where the reading of the data has been suspended, the last read sector must be matched to its sector sub-code. Once matched, this sector may be located on the CD, and the reading of the data may be resumed from this location.
However, since the time period required for the ECC process varies, the matching is difficult. To match the sector data with its corresponding sector sub-code, the conventional method transfers the sector data in the buffer 110 into another location, such as another buffer (not shown). The same audio data sectors are then reread from the CD. The buffered sector data and the reread audio data sectors are then compared to find the identify of the last read sector. However, the algorithm required to perform such a comparison is complicated and require significant processing resources. The accuracy of the matching is also limited since the time required by the ECC process varies and thus is not always predictable.
Accordingly, there exists a need for an improved method and system for audio data retrieval from an optical media. The method and system should simplify the matching of the sector data and its sector sub-code, reduce processing resource requirements, and increase the accuracy of the matching. The present invention addresses such a need.
The present invention provides a method and system for audio data retrieval from an optical media. The method includes reading a sector of audio data from the optical media, the sector comprising a sector data and a sector sub-code; collecting the sector sub-code; correcting any errors in the sector data in a fixed time period; calculating a time offset between a time for the collecting of the sector sub-code and the fixed time period; and matching the corrected sector data to the sector sub-code based on the calculated time offset. A method and system for retrieving audio data from an optical media has been disclosed. The present invention uses a fixed time period for the sector data error correction process. By using a fixed correction time, the sector data and the sector sub-code can be automatically matched based upon an offset calculated from the fixed correction time. In this manner, the sector data and its corresponding sector sub-code may be accurately matched without the need for complicated algorithms. This saves significant processing resources. The location from which the reading of the audio data is resumed is more accurately determined.